<html><body><pre><script>
function pot(x, n) {
   if (n == 0) { return 1; }    
   y = pot(x, n >> 1);
   return (n % 2) ? y*y*x : y*y;
}   

document.writeln(pot(1,0));
document.writeln(pot(1,1));
document.writeln(pot(1,10));
document.writeln(pot(2,15));
document.writeln(pot(2,16));
document.writeln(pot(2,31));
document.writeln(pot(2,32));
document.writeln(pot(2,63));
document.writeln(pot(2,64));

</script></pre></body></html>

